ctftparams_table <- function(){
  
  rownames <- c(
    "\\quad Overall", 
    "\\quad No dependent, under-50",
    "\\quad With dependent(s), under-50",
    "\\quad No dependent, over-50",
    "\\quad With dependent(s), over-50")
  
  table_list <- list()
  directories <- list.dirs("../release/ctftparams/specs", full.names = F, recursive = F)
  for(i in directories){
    table_list[[i]] <- read.csv(paste0("../release/ctftparams/specs/", i, "/ctftparam_tab.csv"))
  }
  
  table <- cbind(table_list[[which(directories == "lowrisk_simplemh_censor0.2_main")]][, c(3, 4, 8)], 
    table_list[[which(directories == "lowrisk_simplemh_censor0.2_switcher")]][, c(3, 4, 8)])           
  
  MakeLatexTableAdj(
    startcodelist = list(
      "\\begin{table}[H]",
      "\\centering",
      "\\begin{tabular}{lcccccc}",
      "&  &  &  &  &  & \\tabularnewline",
      "\\hline", 
      "\\hline", 
      " & \\multicolumn{3}{c}{\\textbf{Individual market}} & \\multicolumn{3}{c}{\\textbf{Small group market}}\\tabularnewline",
      "\\cmidrule(lr){2-4} \\cmidrule(lr){5-7}", 
      "\\textbf{Household type} & \\textbf{Mean} & \\textbf{S.D.} & \\textbf{Share} & \\textbf{Mean} & \\textbf{S.D.} & \\textbf{Share}\\tabularnewline", 
      "\\cmidrule(lr){2-2} \\cmidrule(lr){3-3} \\cmidrule(lr){4-4} \\cmidrule(lr){5-5} \\cmidrule(lr){6-6} \\cmidrule(lr){7-7}",
      "$\\mathbb{\\E}[\\lambda_i]$ &  &  & & & & \\tabularnewline"), 
    tableinnardslist = list(
      table), 
    rownames = list(
      rownames),
    tableinnardsroundvec = c(2), 
    inbetweencodelistlist = list(
    ),
    endcodelist = list(
      "\\hline",
      "$N$ & \\multicolumn{3}{c}{512,515} & \\multicolumn{3}{c}{383,036}\\tabularnewline",
      "\\hline",
      "\\hline",
      "\\end{tabular}\\caption{Derived estimates: non-discretionary spending} \\label{tab:main_t_ctftparams}",
      "\\end{table}")
  )
}